//
//  DSBaseTableViewController.m
//  DaBaiService
//
//  Created by Mac-Mini-KingVision on 15/9/11.
//  Copyright (c) 2015年 Mac-Mini-KingVision. All rights reserved.
//

#import "LYBaseTableViewController.h"
#import "LYBaseRequest.h"
#import "LYProgressHUDManager.h"
@interface LYBaseTableViewController ()

@end

@implementation LYBaseTableViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    double version = [[UIDevice currentDevice].systemVersion doubleValue];
    if (version >= 8.0f) {
        self.gifhud = [[LYGifHUD alloc] initDefaultHudWithSuperView:self.view];
    }
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    
    // Dispose of any resources that can be recreated.
}


-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
    return 0.01;
}

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
}
-(UIStatusBarStyle)preferredStatusBarStyle {
    
    return UIStatusBarStyleLightContent;
}

-(NSMutableArray *)reqeusts
{
    
    if (_reqeusts == nil) {
        
        
        _reqeusts = [[NSMutableArray alloc] init];
        
    }
    return _reqeusts;
}

-(void)dealloc
{
    NSLog(@"%@ 销毁了",NSStringFromClass([self class]));
    for (LYBaseRequest *reqeust in self.reqeusts) {
        if ([reqeust isKindOfClass:[LYBaseRequest class]]) {
            [reqeust stop];
        }
    }
}

@end
